Internalization of extensional equality
نویسنده
چکیده
We propose a natural syntactic account of extensional equality in type theory. Starting from the classical definition of extensional equality by induction on type structure, we show how the logical relation can be internalized in a way that covers all higher dimensions simultaneously. The result is a type theory in which every type has a (nontruncated) globular structure with degeneracy maps. Strong Normalization is expected to hold for the stratified version of this theory. Going further, we show how the a priori meta-theoretic fact that every term of type theory preserves the extensional relation can likewise be internalized. Thus our theory is augmented with a new operator which computes the transport of a given term over a path in its context. This operator has canonical operational semantics much analogous to the reduction rules of explicit substitution calculi. By using normalizing reduction strategies, we may therefore ensure that type-checking remains decidable. 1 Background: the problem of extensionality In recent years, the problem of extensionality in type theory has received increasing attention. In part, this is due to type theory emerging as the language of choice for computer formalisation of mathematics. (Gonthier, Asperti, Avigad, Bertot, Cohen, Garillot, Roux, Mahboubi, O’Connor, Biha, Pasca, Rideau, Solovyev, Tassi and Théry (2013), The Univalent Foundations Program (n.d.).) The fundamental notion of this language, that of a type, is a notion of collection which bases membership on the syntactic form of the objects. Accordingly, the notion of equality between objects of a given type is likewise based on their syntactic form: two expressions are judged as denoting equal objects if one can be transformed into another by a finite sequence of syntactic manipulations. 1 ar X iv :1 40 1. 11 48 v2 [ cs .L O ] 5 M ar 2 01 4 Since a general number-theoretic function can in principle be implemented in any number of ways, there will be different expressions defining the same function which cannot be transformed from one to another using syntactic manipulations only. For example, the function which maps (a code of) a vector of numbers to a rearrangement of it listing the numbers in increasing order, can be implemented using bubble-sort or quick-sort processes, and these cannot be transformed into one another by local simplifications. Therefore, basing equality on syntactic form alone leads to the failure of function extensionality, the principle stating that two functions are equal if they are pointwise equal: ∀x, y (x =A y⇒ fx =B gy) Ô⇒ f =A→B g At the same time, this principle is deeply embedded into the language and culture of mathematics. Indeed, the encoding of the intuitive notion of a function into the formal language of set theory as a set of ordered pairs makes extensionality an inalienable component of the lexical meaning of the word “function”. The above principle then becomes a linguistic one. 1 In order to develop set-theoretic mathematics in type theory, it is convenient to introduce a notion of equality which would justify the above principle, and which could therefore be called extensional equality. Unfortunately, the known ways of doing so result in violation of key design principles of type theory. The classical approach suggested by Martin-Löf (1984) is to extend the definitional (syntactic) equality between expressions, by allowing expressions to be judged as equal whenever the corresponding statement is proved in the system’s logic. (That is, mathematical equality is reflected back into the syntax). In general, such proofs cannot be synthesized mechanically, while checking that a term has a given type still requires checking that two terms are equal. As a result, type checking becomes undecidable, leaving type theory without one of its characteristic features. A more recent idea is due to Voevodsky (2006), who discovered a single sentence in the language of type theory which, when assumed as an axiom, makes the intensional identity type behave like the extensional one. Curiously, at the time of writing these words, the definition of the word “function” given by Google is that it is an “expression with one or more variables”. This corresponds to the type-theoretic notion of a function — a lambda term — and not the set-theoretic notion (a set of pairs having certain properties). Likewise, the middle-school definition of a function as a “black box” which transforms its input into output is more faithfully captured by the lambda calculus viewpoint.
منابع مشابه
Internalization of the Groupoid Interpretation of Type Theory
Homotopical interpretations of Martin-Löf type theory lead toward an interpretation of equality as a richer, more extensional notion. Extensional or axiomatic presentations of the theory with principles based on such models do not yet fully benefit from the power of dependent type theory, that is its computational character. Reconciling intensional type theory with this richer notion of equalit...
متن کاملTowards an Internalization of the Groupoid Model of Type Theory
Homotopical interpretations of Martin-Löf type theory lead toward an interpretation of equality as a richer, more extensional notion. Extensional or axiomatic presentations of the theory with principles based on such models do not yet fully benefit from the power of dependent type theory, that is its computational character. Reconciling intensional type theory with this richer notion of equalit...
متن کاملInternalizing Intensional Type Theory
Homotopical interpretations of Martin-Löf type theory lead toward an interpretation of equality as a richer, more extensional notion. Extensional or axiomatic presentations of the theory with principles based on such models do not yet fully benefit from the power of dependent type theory, that is its computational character. Reconciling intensional type theory with this richer notion of equalit...
متن کاملReasoning in Extensional Type Theory with Equality
We describe methods for automated theorem proving in extensional type theory with primitive equality. We discuss a complete, cut-free sequent calculus as well as a compact representation of cut-free (ground) proofs as extensional expansion dags. Automated proof search can be realized using a few operations to manipulate extensional expansion dags with variables. These search operations form a b...
متن کاملA simple and complete model theory for intensional and extensional untyped λ-equality
We present a sound and complete model theory for theories of β-reduction with or without η-expansion. We then show in what conditions we obtain models of β-equality and βη-equality.
متن کاملExtensional Equality in Intensional Type Theory
We present a new approach to introducing an extensional propositional equality in Intensional Type Theory. Our construction is based on the observation that there is a sound, intensional setoid model in Intensional Type theory with a proof-irrelevant universe of propositions and -rules for and -types. The Type Theory corresponding to this model is decidable, has no irreducible constants and per...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- CoRR
دوره abs/1401.1148 شماره
صفحات -
تاریخ انتشار 2014